<!doctype html>
<html>
	<head>
		<title>登录</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport"
			content="width=device-width,initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<meta content="black" name="apple-mobile-web-app-status-bar-style">
		<meta name="format-detection" content="telephone=no" />
		<meta name="format-detection" content="email=no" />
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<!--删除默认的苹果工具栏和菜单栏。-->
		<link rel="stylesheet" href="webpage/css/login.css" />
		<link rel="stylesheet" href="plug-in/Validform/css/style.css"/>
		<script type="text/javascript" src="webpage/jQuery/jquery-1.9.1.js"></script>
	</head>
	<body style="background-image: url('webpage/images/10.png'); background-repeat:no-repeat; background-size:cover; background-position:0% 0%;">
		<div class="">
			<div class="welcome">
				<!-- <img src="webpage/images/welcome.png"> -->

			</div>
			<div class="login-form" style="position:relative; top:120px;">
				<h1 class="demo-pagetitle" style="color:#008B8B; text-align:center;">配网故障抢修系统</h1>
				<div style="position:relative; top:40px;">
				<div class="login-inp" >
					<label>登录</label><input id="userName" type="text" placeholder="请输入手机号" datatype="*" sucmsg= " ">
				</div>
				<div class="login-inp">
					<label>密码</label><input id="password" type="password" placeholder="请输入密码" datatype="*" sucmsg=" ">
				</div>
				<div class="login-inp">
					<a onclick ="checkLogin()">立即登录</a>
				</div>
				</div>
			</div>
		</div>
		<div style="text-align: center;"></div>
	</body>
	<script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
	<script src="plug-in/ydui/js/ydui.js"></script>
	<script src="http://malsup.github.io/jquery.form.js"></script>
	<script type="text/javascript" src="plug-in/Validform/js/Validform_v5.3.1_min_zh-cn.js"></script>
	<script type="text/javascript" src="plug-in/Validform/js/initValidform.js"></script>
	<script type="text/javascript">
			$(function() {
				if (window.history && window.history.pushState) {
					$(window).on('popstate', function () {
						window.history.pushState('forward', null, '#');
						window.history.forward(1);
					});
				}
				window.history.pushState('forward', null, '#'); //在IE中必须得有这两行
				window.history.forward(1);
			})
			function resetFont(){
				var HTML=document.getElementsByTagName('html')[0];
				var ww=document.documentElement.clientWidth;
				var scale=ww/750;//640是设计图psd的宽度
				HTML.style.fontSize=100*scale+'px';
			}
			resetFont();
			window.onresize=function (){
		         resetFont();
			}
			function checkLogin(){
				$.ajax({
					async : false,
				    cache : false,
					type : 'post', // 提交方式 get/post
					url : "loginController.do?checkLogin", // 需要提交的 url
					dataType: "json",
					data:{
			  			'userName':$('#userName').val(),//账号
			  			'password':$('#password').val(),//密码
					},
					success : function(json) {
						if (json.success) {
							window.location.href="loginController.do?login";
						}else{
							alert(json.msg);
						}
					},
					error:function(){
						
					}
				})
			}
		</script>
</html>
